package handler;

public class CriticalHandler extends Handler {
    @Override
    public void handleRequest(String request) {
        if (request.equals("critical")) {
            System.out.println("紧急处理: 立即停止并报警");
        } else if (successor != null) {
            successor.handleRequest(request);
        }
    }
}